<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app1">
    <myheader></myheader>
</div>
<div id="app2">
    <myheader></myheader>
</div>
<script src="js/vue.js"></script>
<script>
    //全局组件定义
    Vue.component("myheader",{
        template:`<h3>Hello Component</h3>`
    });
    new Vue({
        el:"#app1"
    })
    new Vue({
        el:"#app2"
    })
</script>
</body>
</html>